	<!--{hook header_nav_start.htm}-->
	<header class="navbar navbar-expand-lg navbar-dark bg-primary py-1 mb-3" id="header">
		<div class="container">
			<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#nav" aria-controls="navbar_collapse" aria-expanded="false" aria-label="<?php echo lang('toggler_menu');?>">
				<span class="navbar-toggler-icon"></span>
			</button>
			
			<!--{hook header_nav_logo_before.htm}-->
			<?php if ('index' == $route) { ?>
			<h1 class="d-none"><?php echo $conf['sitename'] ;?></h1>
			<?php } ?>
			<a class="navbar-brand text-truncate d-flex flex-wrap" href="<?php echo $conf['path'];?>">
                <!--替换LOGO 直接替换 view/img/logo.png 不要修改此处-->
				<img src="<?php echo view_path(),$conf['logo_mobile_url'],$static_version;?>" class="logo-2" alt="<?php echo $conf['sitename'] ;?>-WellCMS">
				<?php if($header['mobile_title']) { ?>
					<span class="d-block d-lg-none h5 ml-2 mt-1"><?php echo $header['mobile_title'];?></span>
				<?php } ?>
			</a>
			
			<!--{hook header_nav_logo_after.htm}-->
			
			<?php if(empty($uid)) { ?>
            <!--登录图标-->
				<a class="navbar-brand d-block d-lg-none" rel="nofollow" href="<?php echo url('user-login');?>" aria-label="<?php echo lang('login');?>"> <i class="icon-user"></i></a>
			<?php } else { ?>
            <?php if (group_access($gid, 'allowthread')) { ?>
            <!--{hook header_nav_create.htm}-->
            <?php } else { ?>
            <!--搜索图标-->
				<a class="navbar-brand d-block d-lg-none" href="<?php echo url('operate-search');?>"><i class="icon-search"></i></a>
            <?php } ?>
			<?php } ?>
			
			<!--{hook header_nav_user_icon_after.htm}-->
			
			<div class="collapse navbar-collapse pt-0" id="nav">
				<!-- 左侧：栏目 -->
				<ul class="navbar-nav mr-auto">
					<!--{hook header_nav_forum_start.htm}-->
					<li class="nav-item home" fid="0" data-active="fid-0"><a class="nav-link" href="<?php echo $conf['path'] ;?>"><i class="icon-home d-md-none"></i>&nbsp;<?php echo lang('index_page');?></a></li>
					<!--{hook header_nav_home_link_after.htm}-->
                    <!-- 遍历需要显示的导航 -->
					<?php if (isset($forum_nav)) { foreach($forum_nav as $_forum) { ?>
					<!--{hook header_nav_forumlist_loop_start.htm}-->
                    <!-- li 格式 重新定义或添加新 class -->
					<li class="nav-item" fid="<?php echo $_forum['fid'];?>" data-active="fid-<?php echo $_forum['fid'];?>">
                        <!-- a标签格式 重新定义或添加新 class -->
						<a class="nav-link" href="<?php echo $_forum['url'];?>" <?php if (3 == $_forum['category']){echo 'target="_blank"';}?>><i class="icon-circle-o d-md-none"></i>&nbsp;<?php echo $_forum['name'];?></a>
					</li>
					<!--{hook header_nav_forumlist_loop_end.htm}-->
					<?php }} ?>
					<!--{hook header_nav_forum_end.htm}-->
				</ul>
				<!-- 右侧：用户 -->
				<ul class="navbar-nav">
                    <!-- 搜索 -->
					<li class="nav-item">
						<div class="form-group px-2 mb-0 mt-1">
                            <form action="<?php echo url('operate-search'); ?>" id="form-search">
                                <div class="input-group input-group-sm mb-0">
                                    <input type="text" class="form-control" placeholder="<?php echo lang('keyword'); ?>" name="keyword" value="">
                                    <input type="hidden" name="range" value="1">
                                    <div class="input-group-append">
                                        <button class="btn btn-secondary btn-search-sm" type="submit" id="submit">
                                            <i class="icon-search"></i>
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>
					</li>
					<!--{hook header_nav_user_start.htm}-->
				<?php if(empty($uid)) { ?>
					<li class="nav-item"><a class="nav-link" rel="nofollow" data-modal-title="<?php echo lang('login');?>" data-modal-size="md" href="<?php echo url('user-login');?>"><i class="icon-user"></i>&nbsp;<?php echo lang('login');?></a></li>
					<!--<li class="nav-item"><a class="nav-link" href="<?php echo url('user-create');?>"><?php echo lang('register');?></a></li>-->
				<?php } else { ?>
					<li class="nav-item username"><a class="nav-link" rel="nofollow" href="<?php echo url('home');?>"><!--<img class="avatar-1" src="<?php echo $user['avatar_url'];?>">&nbsp;--><?php echo $user['username'];?></a></li>
					<!-- 管理员 -->
					<?php if(group_access($gid, 'intoadmin')) { ?>
					<li class="nav-item"><a class="nav-link" rel="nofollow" href="<?php echo $conf['path'];?>admin/"><i class="icon-home"></i>&nbsp;<?php echo lang('admin_page');?></a></li>
					<?php } ?>
					<!--{hook header_nav_admin_page_after.htm}-->
					<li class="nav-item"><a class="nav-link" rel="nofollow" id="user-logout" href="<?php echo url('user-logout');?>"><i class="icon-sign-out"></i>&nbsp;<?php echo lang('logout');?></a></li>
				<?php } ?>
					<!--{hook header_nav_user_end.htm}-->
				</ul>
			</div>
		</div>
	</header>
	<!--{hook header_nav_end.htm}-->